<extend file='resource/admin/system'/>
<block name="content">
    <!-- TAB NAVIGATION -->
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#tab1">模块列表</a></li>
        <li><a href="{{u('design')}}" >设计模块</a></li>
    </ul>
    <table class="table table-hover">
    	<thead>
    		<tr>
    			<th width="8%">编号</th>
    			<th>模块名称</th>
    			<th>模块作者</th>
    			<th>发布时间</th>
    			<th>图片</th>
    			<th>操作</th>
    		</tr>
    	</thead>
    	<tbody>
        <foreach from="$module" value="$v">
    		<tr>
    			<td>{{$v['id']}}</td>
    			<td>{{$v['module_title']}}</td>
    			<td>{{$v['module_author']}}</td>
    			<td>{{$v['updated_at']}}</td>
<!--    			<td><img style="width: 40%;height: 15%" src="{{$v['module_thumb']}}" alt=""></td>-->
    			<td><img style="width: 110px;height: 80px" src="{{$v['module_thumb']}}" alt=""></td>
    			<td>
                    <div class="btn-group btn-group-sm">
                        <a href="javascript:;" onclick="del('{{$v['module_name']}}')" class="btn btn-danger">卸载模块</a>
                    </div>
                </td>
    		</tr>
        </foreach>
    	</tbody>
    </table>
	<script>
		function del(module_name) {
			util.confirm('确定删除吗', function (res) {
				location.href = "{{u('del')}}&module_name=" + module_name;
			})
		}
	</script>
</block>
